<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'messageshow.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <%
    Vector v=(Vector)application.getAttribute("mess");
    out.print("<table border=2>");
    out.print("<tr>");
    out.print("<td bgcolor=cyan>序号</td>");
    out.print("<td bgcolor=cyan >"+"留言人姓名"+"</td>");
    out.print("<td bgcolor=cyan >"+"留言内容"+"</td>");
    out.print("</tr>");
    for(int i=0;i<v.size();i++)
    	 {
    String s=(String)v.elementAt(i);
   String username[]=s.split("\\|");
   out.print("<tr>");
   out.print("<td>"+i+"</td>");
 for(int j=0;j<username.length;j++)
 {	if(j==0){
	 out.print("<td bgcolor=red>");
	 out.print(username[j]);
	 out.print("</td>");
 }
 if(j==1)
 {out.print("<td>");
	 out.print("<textarea rols=14 cols=15 bgcolor=red>");
	 out.print(username[j]);
	 out.print("</textarea>");
	 out.print("</td>");
 }
 }
 out.print("</tr>");
    	 }

    out.print("</table>");
    %>
  </body>
</html>
